﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using VideoStore.Services.Interfaces;
using VideoStore.Business.Entities;
using VideoStore.Business.Components;
using VideoStore.Business.Components.Interfaces;
using Microsoft.Practices.ServiceLocation;

namespace VideoStore.Services
{
    public class TransferNotificationService : ITransferNotificationService
    {
        private IOrderProvider OrderProvider
        {
            get { return ServiceLocator.Current.GetInstance<IOrderProvider>(); }
        }

        public void NotifyTransferOutcome(TransferNotification pOutcome)
        {
            OrderProvider.ConfirmOrder(pOutcome.Outcome, pOutcome.OrderId, pOutcome.ReverseTransaction);
        }
    }
}
